#!/usr/bin/env bash


#wget https://github.com/yunsonbai/ysab/releases/download/v1.0.2/ysab-linux-v1.0.2.tgz

#---------------------------------------------------------- PS
###########################certify
POD_IP="10.196.55.200"
ysab -r 10 -n 200 -m POST -u http://$POD_IP:9096/ac-julink-ps/certify -d '{"wifi_id":"86500110001000100010000010b5bc926678"}'

###########################verify
curl -X POST -H 'content-type:application/json'  http://$POD_IP:9096/ac-julink-ps/certify -d '{"wifi_id":"86500110001000100010000010b5bc926678"}'
ysab -r 10 -n 200 -m POST -u http://$POD_IP:9096/ac-julink-ps/verify -d '{"token":"a6bf1b22cfd049ed999731c64e9ec2bc"}'





#---------------------------------------------------------- WAREHOUSE
POD_IP="10.196.39.119"
ysab -r 100 -n 200 -t 30 -m POST -u http://$POD_IP:5814/ac-julink-warehouse/activateDevice -d '{"physicalDeviceId":"865001100010001000100000100000000000", "needToken": true}'

#curl -X POST -H 'content-type:application/json'  http://$POD_IP:5814/ac-julink-warehouse/activateDevice -d '{"physicalDeviceId":"865001100010001000100000100000000000", "needToken": true}'






#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
container_name="553a555b86ff7"
for i in `seq 1 1000`; do crictl stats| grep $container_name; sleep 1; done
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


10.196.30.84
curl -X POST -H 'content-type:application/json'  http://$POD_IP:9096/ac-julink-ps/certify -d '{"wifi_id":"86500110001000100010000010b5bc926678"}'

curl -X POST -H "Content-Type:application/x-zc-object" -H "x-zc-major-domain-id:16" -H "x-zc-sub-domain-id:22" -H "X-Zc-Timeout:9999999" -H "x-zc-developer-id:333" \
-d '{"wifi_id":"86500110001000100010000010b5bc926678"}' \
"http://10.196.1.112:5020/zc-julink-auth/v1/certify"

ysab -r 100 -n 900 -m POST -H "Content-Type:application/x-zc-object" -H "x-zc-major-domain-id:16" -H "x-zc-sub-domain-id:22" -H "X-Zc-Timeout:9999999" -H "x-zc-developer-id:333" -u http://10.196.1.112:5020/zc-julink-auth/v1/certify -d '{"wifi_id":"86500110001000100010000010b5bc926678"}'
